header {
    background: linear-gradient(135deg, #2d1b4e 0%, #3d2a5e 100%);
    color: #f8f0ff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
    border-bottom: 2px solid #c47aff;
    position: relative;
    font-family: 'Segoe UI', 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
    box-shadow: 0 4px 20px rgba(156, 89, 209, 0.3);
}

/* Стили для логотипа */
.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 2px 6px rgba(198, 122, 255, 0.4));
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05) rotate(2deg);
}

.logo h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(198, 122, 255, 0.3);
    color: #f8f0ff;
    background: linear-gradient(45deg, #e8b4e1, #c47aff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Стили для языкового переключателя */
.language-buttons {
    position: absolute;
    top: 1rem;
    right: 2rem;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-dropdown-btn {
    background: rgba(156, 89, 209, 0.9);
    color: #f8f0ff;
    padding: 8px 16px;
    border: 1px solid #9c59d1;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 80px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1001; /* Поднимаем кнопку над меню */
}

.language-dropdown-btn:hover {
    background: #9c59d1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 89, 209, 0.4);
}

.language-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    background: rgba(45, 27, 78, 0.98);
    border: 1px solid #c47aff;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 25px rgba(156, 89, 209, 0.3);
    z-index: 1000;
    backdrop-filter: blur(15px);
    padding: 15px 0 8px 0; /* Больше padding сверху */
    margin-top: -10px; /* Сдвигаем меню вверх */
    border-top: none;
}

/* Создаем расширенную область для наведения */
.language-dropdown:hover .language-dropdown-content {
    display: block;
}

/* Расширяем область наведения на весь dropdown */
.language-dropdown::after {
    content: '';
    position: absolute;
    top: 0;
    left: -5px;
    right: -5px;
    bottom: -50px; /* Расширяем область далеко вниз */
    background: transparent;
    z-index: 999;
    pointer-events: none;
}

.language-dropdown:hover::after {
    pointer-events: auto; /* Включаем события только при наведении */
}

.language-dropdown-content button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #f8f0ff;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border-radius: 8px;
    margin: 2px 0;
    position: relative;
    z-index: 1002; /* Поднимаем кнопки над расширенной областью */
}

.language-dropdown-content button:hover {
    background: linear-gradient(45deg, #e8b4e1, #c47aff);
    color: #1a0b2e;
    transform: translateX(5px);
}
/* Навигационное меню */
.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
    text-align: center;
}

.nav-links a {
    text-decoration: none;
    color: #f8f0ff;
    padding: 10px 0;
    display: block;
    transition: all 0.3s ease;
    font-weight: 300;
    letter-spacing: 0.5px;
    position: relative;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.nav-links a::before {
    content: '❀';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
    color: #e8b4e1;
    margin-left: -5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #e8b4e1, #c47aff);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-links a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(228, 180, 225, 0.5);
}

.nav-links a:hover::before {
    opacity: 1;
    left: -15px;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a[style*="color:#A9A9A9"] {
    color: #e8b4e1 !important;
    font-weight: 500;
    text-shadow: 0 0 8px rgba(228, 180, 225, 0.6);
}

.nav-links a[style*="color:#A9A9A9"]::before {
    opacity: 1;
    left: -15px;
}

.nav-links a[style*="color:#A9A9A9"]::after {
    width: 100%;
    background: linear-gradient(90deg, #e8b4e1, #c47aff);
}

/* Дополнительные декоративные элементы */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e8b4e1, #c47aff, transparent);
    opacity: 0.5;
}

/* Адаптивность */
@media (max-width: 768px) {
    header {
        padding: 1rem;
        height: auto;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .language-buttons {
        position: static;
        align-self: center;
    }
    
    .nav-links {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-links li {
        width: auto;
    }
    
    .nav-links a::before {
        display: none;
    }
}

/* Анимация появления */
@keyframes sakuraFall {
    0% { transform: translateY(-10px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

header {
    animation: sakuraFall 0.8s ease-out;
}